/**
* @Description: WoShop商城
* @Author: 梧桐
* @Copyright: 武汉一一零七科技有限公司©版权所有
* @Link: www.wo-shop.net
* @Contact: QQ:2487937004
*/
<template>
  <view class="index_class">
    <text class="logi-title">{{$t('快递公司')}}：{{logisticsName}} ，{{$t('快递单号')}}:{{psnum}}</text>
    <view class="logi-list">
      
      <view class="item_wrap" v-for="(item,index) in logisticsInfo" :key="index">
        <view class="items" v-if="index < logisticsInfo.length-1">
          <view class="left-icon"></view>
          <view class="right-text">{{item.AcceptStation}}<text>{{item.AcceptTime}}</text></view>
        </view>
        <view class="items active" v-if="index == logisticsInfo.length-1">
          <view class="left-icon"></view>
          <view class="right-text">{{item.AcceptStation}}<text>{{item.AcceptTime}}</text></view>
        </view>
      </view>
      <view class="item_wrap" v-if="noData == 1">
        <view class="items">
          <view class="left-icon"></view>
          <view class="right-text">{{noDataStr}}<text></text></view>
        </view>
      </view>
    
    
    </view>
  </view>
</template>

<script>
export default {
  data() {
    return {
      psnum: '', // 配送订单号
      kdniaoCode: '', // 快递鸟物流公司编码
      logisticsName: '',
	  telephone: '',
      logisticsInfo: {},
      noData: 0,
      noDataStr: '',
    };
  },
  onLoad(option) {
    this.psnum = option.psnum;
    this.kdniaoCode = option.kdniao_code;
    this.logisticsName = option.logistics_name;
	this.telephone = option.telephone
    this.getLogisticsInfo();
  },
  methods:{
    getLogisticsInfo() {
      this.$loading();
      this.$http.getLogisticsInfo({ psnum : this.psnum, kdniao_code:  this.kdniaoCode,telephone:this.telephone}).then(res => {
        if (res.status == 200) {
          this.$hideLoading()
          this.logisticsInfo = res.data;
        }else{
          this.noData = 1;
          this.noDataStr = res.mess;
        }
      });
    },
  }
}
</script>

<style>
.index_class {
  background-color: #fff;
  
}
</style>
